package com.boil.qz.safekavass.pojo;

/**
 * Created by ChenYong on 2017-08-08.
 * <br>
 * 角色映射实体类。
 */
public class RoleVo {
    /**
     * 角色编号
     */
    private Long id;
    /**
     * 角色名称
     */
    private String roleName;
    /**
     * 角色代码
     */
    private String roleCode;
    /**
     * 角色拥有的资源
     */
    private String resourceNames;
    /**
     * 角色拥有的权限
     */
    private String permissionCodes;
    /**
     * 创建时间
     */
    private String createTime;

    /**
     * 默认构造器。
     */
    public RoleVo() {
        super();
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getRoleCode() {
        return roleCode;
    }

    public void setRoleCode(String roleCode) {
        this.roleCode = roleCode;
    }

    public String getResourceNames() {
        return resourceNames;
    }

    public void setResourceNames(String resourceNames) {
        this.resourceNames = resourceNames;
    }

    public String getPermissionCodes() {
        return permissionCodes;
    }

    public void setPermissionCodes(String permissionCodes) {
        this.permissionCodes = permissionCodes;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        RoleVo roleVo = (RoleVo) o;

        return id != null ? id.equals(roleVo.id) : roleVo.id == null;
    }

    @Override
    public int hashCode() {
        return id != null ? id.hashCode() : 0;
    }

    @Override
    public String toString() {
        final StringBuffer sb = new StringBuffer("RoleVo{");
        sb.append("id=").append(id);
        sb.append(", roleName='").append(roleName).append('\'');
        sb.append(", roleCode='").append(roleCode).append('\'');
        sb.append(", resourceNames='").append(resourceNames).append('\'');
        sb.append(", permissionCodes='").append(permissionCodes).append('\'');
        sb.append(", createTime='").append(createTime).append('\'');
        sb.append('}');
        return sb.toString();
    }
}